{
StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv;
ClutterTextDirection direction;
+ ClutterScrollDirection scroll_direction;
/* don't handle scroll events if requested not to */
if (!priv->mouse_scroll)
return TRUE;
direction = clutter_actor_get_text_direction (self);
+ scroll_direction = clutter_event_get_scroll_direction ((ClutterEvent *) event);
- switch (event->direction)
+ switch (scroll_direction)
{
case CLUTTER_SCROLL_SMOOTH:
{
break;
case CLUTTER_SCROLL_UP:
case CLUTTER_SCROLL_DOWN:
- adjust_with_direction (priv->vadjustment, event->direction);
+ adjust_with_direction (priv->vadjustment, direction);
break;
case CLUTTER_SCROLL_LEFT:
case CLUTTER_SCROLL_RIGHT:
{
ClutterScrollDirection dir;
- dir = event->direction == CLUTTER_SCROLL_LEFT ? CLUTTER_SCROLL_RIGHT
+ dir = scroll_direction == CLUTTER_SCROLL_LEFT ? CLUTTER_SCROLL_RIGHT
: CLUTTER_SCROLL_LEFT;
adjust_with_direction (priv->hadjustment, dir);
}
else
{
- adjust_with_direction (priv->hadjustment, event->direction);
+ adjust_with_direction (priv->hadjustment, direction);
}
break;
default: